//
//  ViewController.swift
//  07-空项目
//
//  Created by 李南江 on 15/9/6.
//  Copyright © 2015年 xiaomage. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        view.backgroundColor = UIColor.greenColor()
        
        let btn = UIButton(type: UIButtonType.ContactAdd)
        
        btn.center = CGPoint(x: UIScreen.mainScreen().bounds.width * 0.5, y: UIScreen.mainScreen().bounds.height * 0.5)
        btn.addTarget(self, action: "btnClick:", forControlEvents: UIControlEvents.TouchUpInside)
        view.addSubview(btn)
    }

    func btnClick(btn: UIButton) {
        print(__FUNCTION__)
        print(btn)
    }
}

